Field of the Invention
Embodiments of the present invention relate generally to graphics processing and, more specifically, to managing event count reports in a tile-based architecture.
Description of the Related Art
In typical operation, a graphics processing pipeline may be directed to provide a count of a number of occurrences of a certain event. For example, the graphics processing pipeline may be directed to record the number of pixels that pass a z-test or the number of pixels for which a specified operation is performed in the pixel shader. Such counts may be useful to an application, which may condition certain work on such counts. For example, certain rendering operations may be conditioned on the count associated with a “z-pass pixel test,” where those rendering operations are performed only when the number of pixels that pass a z-test exceeds a certain threshold value.
Some graphics subsystems for rendering graphics images implement a tiling architecture, where one or more render targets, such as a frame buffer, are divided into screen space partitions referred to as “tiles.” In such a tiling architecture, the graphics subsystem rearranges work such that the work associated with any particular tile remains in an on-chip cache for a longer time than with an architecture that does not rearrange work in this manner. This rearrangement helps to improve memory bandwidth as compared with a non-tiling architecture.
In graphics subsystems that implement a tiling architecture and re-order work, the event counts discussed above may not provide the desired results. More specifically, because the work is re-ordered, the mechanisms that record the requested counts may record incorrect numbers. For example, a first set of work and a second set of work could be divided into several subsets, each associated with a different tile, which would then be interleaved. If a count request were to request an event count associated with the first set of work, then when the first set of work and second set of work were interleaved, the count request would include values associated with both the first set of work and the second set of work, which is not what is requested.
As the foregoing illustrates, what is needed in the art is a more effective technique for counting event occurrences in a tile-based architecture.